using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for ImageManager
/// </summary>
public partial class ImageManager : System.Web.UI.UserControl
{
    public ImageManager()
    {


    }
    private string _imageFolder = "images/productimages";

    public string ImageFolder {
        get { return _imageFolder; }
        set { _imageFolder = value; }
    }
	
    void Page_Load(object sender, EventArgs e)
    {

    }
    public string GetSelectedImage()
    {
        string imgName = Request.Form[ClientID + "_imgHolder"].ToString();
        return imgName;
        //return System.IO.Path.GetFileName(imgName);
    }
    public void SetImage(string imageUrl)
    {
        if (!String.IsNullOrEmpty(imageUrl)) {
            imgPic.ImageUrl = imageUrl;
        } else {
            imgPic.ImageUrl = Page.ResolveUrl("~/images/1pix.gif");
        }
    }
    protected string GetImage()
    {
        string sImage = imgPic.ImageUrl;
        sImage = System.IO.Path.GetFileName(sImage);
        return sImage;

    }
}
